#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
void init(int* arr,int digit)
{
	for (int i = 0; i < digit; i++) 
		arr[i] = 0;
}

void print(int* arr, int digit)
{
	for (int i = 0; i < digit; i++)
		printf("%d ", arr[i]);
	printf("\n");
}

void reserve(int* arr, int digit)
{
	int i = 0, t;
	while (i <= digit - 1 - i) {
		t = arr[i];
		arr[i] = arr[digit - 1 - i];
		arr[digit - 1 - i] = t;
		i++;
	}
}
int main()
{
	int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	print(arr, sz);
	reserve(arr, sz);
	print(arr, sz);
	init(arr, sz);
	print(arr, sz);
	return 0;
}